#include<pthread.h>
#include<stdio.h>
#include<stdlib.h>
void* say_hello(void*arg)
{
    printf("Hello word!\n");
    return NULL;
}

int main()
{
    pthread_t tid;
   if( pthread_create(&tid,NULL,say_hello,NULL))
   {
       printf("Cannot create thread\n");
       exit(1);
   }
   printf("Main waits for thread to finish...\n");
    pthread_join(tid,NULL);//等待线程结束

    return 0;
}
